package org.skipper.samples.rocketmq.cluster.consume;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.skipper.rocketmq.spring.starter.annotation.RocketMQMessageListener;
import org.skipper.rocketmq.spring.starter.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author shoujian
 * Date: 2021-08-04
 * Time: 下午7:31
 */
@Component
@RocketMQMessageListener(nameServer = "10.8.0.1:9876", topic = "nodeProcess", consumerGroup = "voyage-samples-mq-double-clusterTwo")
public class ConsumerTwo implements RocketMQListener<String> {

    @Override
    public void onMessage(String message) {
        JSONObject json = JSON.parseObject(message);
        System.out.println("consumeTwo : {}"+ json);
    }
}
